/*
 *Copyright 2021-2023 NERCIS
 *
 *Licensed under the Apache License, Version 2.0 (the "License");
 *you may not use this file except in compliance with the License.
 *You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *See the License for the specific language governing permissions and
 *limitations under the License.
 */

package cn.ac.nercis.pes.model.standard;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * 标准清单清单文件信息
 *
 * @author zpy
 * @version 1.0.0
 */
public enum StandardInfo {
    VERSION("1.0"),
    MANIFEST_FILE("manifest.json"),
    PROJECT_FILE("project.json"),
    SYSTEM_BASE_FILE("system_base_data.json"),
    SYSTEM_FILE_DIR("files/"),
    SYSTEM_TARGET_FILE("system_target_data.json"),
    SYSTEM_SPECIAL_TARGET_FILE("system_special_target_data.json"),
    SYSTEM_PROCESS_FILE("system_process.json"),
    EVALUATION_PROCESS_FILE("prepare_evaluation_process.json"),
    EVALUATION_CONTENT_FILE("prepare_evaluation_content.json"),
    EVALUATOR_FILE("prepare_evaluator.json"),
    EVALUATION_TOOLS_FILE("prepare_evaluation_tools.json"),
    PASSWORD_SERVER_FILE("prepare_password_server.json"),
    SECURITY_THREAT_FILE("prepare_security_threat.json"),
    ASSET_FILE("prepare_asset.json"),
    PERSONNEL_FILE("prepare_personnel.json"),
    SECURITY_DOCUMENT_FILE("prepare_security_document.json"),
    EVALUATION_DESC_FILE("planning_evaluation_desc.json"),
    EVALUATION_METHOD_FILE("planning_evaluation_method.json"),
    EVALUATION_REQUIRE_FILE("planning_evaluation_require.json"),
    EVALUATION_RECORD_FILE("evaluation_record.json"),
    UNIT_EVALUATION_FILE("analyze_unit_evaluation.json"),
    LAYER_EVALUATION_FILE("analyze_layer_evaluation.json"),
    OVERALL_EVALUATION_FILE("analyze_overall_evaluation.json"),
    RESULT_CORRECTION_FILE("analyze_result_correction.json"),
    RISK_ANALYSIS_FILE("analyze_risk_analysis.json"),
    UNIT_RISK_ANALYSIS_FILE("analyze_unit_risk_analysis.json"),

    PROOF_EVALUATOR("proof_evaluator_qualification.json"),
    EVALUATION_REPORT_FILE("report_info.json");

    private final String value;

    StandardInfo(String value) {
        this.value = value;
    }

    public static List<String> findManifestFiles() {
        return Stream.of(StandardInfo.values())
                .filter(si -> si != VERSION && si != SYSTEM_FILE_DIR)
                .map(StandardInfo::getValue)
                .collect(Collectors.toList());
    }

    public String getValue() {
        return value;
    }
}
